From ef65d9f9af3cc6f68f2bd4e6618c9a5eab6444c2 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Thu, 12 May 2005 18:58:55 +0000 Subject: [PATCH] bitkeeper revision 1.1159.280.1 (4283a76ftpuj_gm_Dw7id90bgDL3JQ) Many files: Use marker files instead of depending on the change times of directories. ignore: Add patches/*/.makedep. Cleanup ignore list. Signed-off-by: Christian Limpach --- BitKeeper/etc/ignore | 6 +---- Makefile | 4 +--- buildconfigs/Rules.mk | 41 ++++++++++++++++++++------------- buildconfigs/mk.linux-2.4-xen0 | 6 ++--- buildconfigs/mk.linux-2.4-xenU | 6 ++--- buildconfigs/mk.linux-2.6-xen0 | 6 ++--- buildconfigs/mk.linux-2.6-xenU | 6 ++--- buildconfigs/mk.netbsd-2.0-xenU | 6 ++--- 8 files changed, 42 insertions(+), 39 deletions(-) diff --git a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore index 1ef3b0e2a0..f87c654e98 100644 --- a/BitKeeper/etc/ignore +++ b/BitKeeper/etc/ignore @@ -52,6 +52,7 @@ netbsd-*-tools/* netbsd-*-xen0/* netbsd-*-xenU/* netbsd-*.patch +patches/*/.makedep patches/tmp/* pristine-* ref-* @@ -90,8 +91,3 @@ xen/tools/figlet/figlet xen/xen xen/xen-syms xen/xen.* -install/* -patches/ebtables-brnf-5_vs_2.4.25.diff -patches/ebtables.diff -tools/x2d2/minixend -BLOG diff --git a/Makefile b/Makefile index dc58f49648..058a424180 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,6 @@ KERNELS ?= linux-2.6-xen0 linux-2.6-xenU # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU # You may use wildcards in the above e.g. KERNELS=*2.4* -ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*)) -ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse)) XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) ) export DESTDIR @@ -86,7 +84,7 @@ world: $(MAKE) dist # clean doesn't do a kclean -clean: +clean:: $(MAKE) -C xen clean $(MAKE) -C tools clean $(MAKE) -C docs clean diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk index 60b4fea1db..a2c4cc5ecc 100644 --- a/buildconfigs/Rules.mk +++ b/buildconfigs/Rules.mk @@ -4,6 +4,9 @@ DISTDIR ?= $(CURDIR)/dist DESTDIR ?= $(DISTDIR)/install +ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*)) +ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse)) + .PHONY: mkpatches mrproper # Setup pristine search path @@ -47,23 +50,29 @@ else OS_VER = $(NETBSD_VER) endif -pristine-%: %.tar.bz2 - rm -rf tmp-$(@F) $@ - mkdir -p tmp-$(@F) - tar -C tmp-$(@F) -jxf $< - mv tmp-$(@F)/* $@ +$(patsubst %,pristine-%/.valid-pristine,$(ALLSPARSETREES)) : pristine-%/.valid-pristine: %.tar.bz2 + rm -rf tmp-pristine-$* $(@D) + mkdir -p tmp-pristine-$* + tar -C tmp-pristine-$* -jxf $< + mv tmp-pristine-$*/* $(@D) + @rm -rf tmp-pristine-$* touch $@ # update timestamp to avoid rebuild - @rm -rf tmp-$(@F) -OS_PATCHES = $(shell echo patches/$(OS)-$(OS_VER)/*.patch) +PATCHDIRS := $(wildcard patches/*-*) + +-include $(patsubst %,%/.makedep,$(PATCHDIRS)) + +$(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: + @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@ + +clean:: + rm -f patches/*/.makedep -ref-%: pristine-% $(OS_PATCHES) - rm -rf $@ - cp -al $< tmp-$(@F) +ref-%/.valid-ref: pristine-%/.valid-pristine + rm -rf $(@D) + cp -al $( $@ || true + diff -Nurp $( $@ || true rm -rf tmp-$@ %-mrproper: %-mrproper-extra diff --git a/buildconfigs/mk.linux-2.4-xen0 b/buildconfigs/mk.linux-2.4-xen0 index dfa13af497..0a6df66000 100644 --- a/buildconfigs/mk.linux-2.4-xen0 +++ b/buildconfigs/mk.linux-2.4-xen0 @@ -24,9 +24,9 @@ patches/tmp/ebtables.diff: wget http://www.cl.cam.ac.uk/netos/xen/downloads/ebtables-brnf-5_vs_2.4.27.diff.gz -O- | gunzip -c > $@ $(LINUX_DIR)/include/linux/autoconf.h: patches/tmp/ebtables.diff -$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER) +$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref rm -rf $(LINUX_DIR) - cp -al $< $(LINUX_DIR) + cp -al $(